package edu.unf.cen6940.domain;

import java.io.Serializable;

import javax.persistence.Id;

import javax.persistence.*;

/**
 */
public class FacultyresearchtostudentPK implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 */
	public FacultyresearchtostudentPK() {
	}

	/**
	 */

	@Column(name = "facultyResearchID", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	public Integer facultyResearchId;
	/**
	 */

	@Column(name = "studentID", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	public Integer studentId;
	/**
	 */

	@Column(name = "facultyID", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	public Integer facultyId;

	/**
	 */
	public void setFacultyResearchId(Integer facultyResearchId) {
		this.facultyResearchId = facultyResearchId;
	}

	/**
	 */
	public Integer getFacultyResearchId() {
		return this.facultyResearchId;
	}

	/**
	 */
	public void setStudentId(Integer studentId) {
		this.studentId = studentId;
	}

	/**
	 */
	public Integer getStudentId() {
		return this.studentId;
	}

	/**
	 */
	public void setFacultyId(Integer facultyId) {
		this.facultyId = facultyId;
	}

	/**
	 */
	public Integer getFacultyId() {
		return this.facultyId;
	}

	/**
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = (int) (prime * result + ((facultyResearchId == null) ? 0 : facultyResearchId.hashCode()));
		result = (int) (prime * result + ((studentId == null) ? 0 : studentId.hashCode()));
		result = (int) (prime * result + ((facultyId == null) ? 0 : facultyId.hashCode()));
		return result;
	}

	/**
	 */
	public boolean equals(Object obj) {
		if (obj == this)
			return true;
		if (!(obj instanceof FacultyresearchtostudentPK))
			return false;
		FacultyresearchtostudentPK equalCheck = (FacultyresearchtostudentPK) obj;
		if ((facultyResearchId == null && equalCheck.facultyResearchId != null) || (facultyResearchId != null && equalCheck.facultyResearchId == null))
			return false;
		if (facultyResearchId != null && !facultyResearchId.equals(equalCheck.facultyResearchId))
			return false;
		if ((studentId == null && equalCheck.studentId != null) || (studentId != null && equalCheck.studentId == null))
			return false;
		if (studentId != null && !studentId.equals(equalCheck.studentId))
			return false;
		if ((facultyId == null && equalCheck.facultyId != null) || (facultyId != null && equalCheck.facultyId == null))
			return false;
		if (facultyId != null && !facultyId.equals(equalCheck.facultyId))
			return false;
		return true;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder("FacultyresearchtostudentPK");
		sb.append(" facultyResearchId: ").append(getFacultyResearchId());
		sb.append(" studentId: ").append(getStudentId());
		sb.append(" facultyId: ").append(getFacultyId());
		return sb.toString();
	}
}
